home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
U-Utilities
/
(c)u3.d64
/
copy some.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-11
|
7KB
|
201 lines
10 REM" [195]OPY-[211]OME 1541 [214]ERSION 2.2
15 [143]"
20 REM" BY [208]AUL [203]ELLAM
25 [143]" 105 (null)UTELA LEFT$EIGHTS (null)D.
30 REM" [194]RANTFORD, [207]NTARIO
35 [143]" (null)3(null) 1ATN4
40 REM"
45 [143]" ATNNY COMMENTS, QUESTIONS OR SUGGESTIONS
50 REM" ARE WELCOME.
55 [143]"
60 REM" [206][207][212][197] : [198]OR AN DECREASE IN THE # OF
65 [143]" TIMES IT IS NECESSARY TO SWITCH
70 REM" DISKS, COMPACT THIS PROGRAM
75 [143] " USING 'CONSTRICTOR.C' FROM (null)(null)(null)CHR$
80 REM" DISK # D4
85 [143]"
86 REM *** ***
87 REM" *** [211]ET UP [214]ARIABLES & [195]OLOUR***
88 [143] *** ***
90 [139] F[178]1 [167] 95
91 F[178]1:[147]"COPY SOME ML.D",8,1
95 [151]53280,6:[151]53281,15:[153]"LOAD"
100 F[178]0:[151]52037,[194](56):[151]56,[194](46)[170]11:[151]52036,[194](46)[170]12
105 [151]52038,[194](55):[151]55,255:[151]51,255:[151]52,[194](56):[156]
110 [134] DT$(50),DS$(50),FT$(50),NF$(50),NL$(50),NH$(50),NB%(50)
190 NF[178]0:TD$[178]""
194 [143] *** ***
195 [143]" *** STR$ISPLAY/LENHOOSE OPTIONS ***
196 REM *** ***
200 PRINTCHR$(14)"[147][151]"SPC(10)"[195]OPY-[211]OME 1541 V2.2"
205 PRINTSPC(9)"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
210 PRINTTAB(18)"[152]BY [208]AUL [203]ELLAM"
220 PRINT" F1 [151][211]ELECT [211]OURCE [196]ISK & [198]ILES/[208]ROGRAMS"
230 PRINT" TO BE COPIED."
240 PRINT" F3 [151][211]ELECT [212]ARGET [196]ISK."
245 IF TD$>"" THENPRINT"[152] ([195]URRENTLY '";TD$;"')"
250 PRINT" F5 [151][208]ERFORM [195]OPY [208]ROCEDURE."
255 IF RP%=1 THEN PRINT"[152] ([206]O FURTHER DATA READS REQUIRED.)"
260 PRINT" F7 [151][197]XIT FROM [208]ROGRAM."
280 PRINT" [208]RESS KEY FOR DESIRED OPERATION."
290 WAIT 198,1:GET OP$:OP=ASC(OP$)
300 IF OP<133 OR OP>136 THEN 290
310 IF OP<>136 THEN GOTO 320
312 PRINT"[147][151] [199]OOD-BYE !":CLR:POKE55,PEEK(52038):POKE56,PEEK(52037)
314 POKE51,PEEK(55):POKE52,PEEK(56):END
320 ON OP-132 GOSUB 1000,1500,2000: GOTO 200
999 END
1000 REM *** ***
1001 REM "*** [196]ETERMINE [198]ILES/[208]ROGS ***
1002 [143] "*** TO BE LENOPIED. ***
1003 REM *** ***
1010 NF=0:PRINT"[147][151] [201]NSERT [211]OURCE [196]ISK.":GOSUB 9000:PRINT"[147][151] [208]LEASE WAIT..."
1020 RP%=0:OPEN 15,8,15:OPEN 2,8,2,"#"
1030 INPUT#15,EN,EM$,ET,ES:IF EN<>0 THEN CLOSE2:CLOSE15:GOTO 1000
1040 PRINT#15,"U1:2,0";18;0
1050 PRINT#15,"B-P:2,144"
1060 SI$="":FOR I=1 TO 20:GET#2,BY$:SI$=SI$+BY$:NEXT
1064 PRINT"[147] [211]OURCE: [152]"SI$
1065 PRINT"[151] [195]HOOSE PROGRAMS/FILES TO BE COPIED."
1070 PRINT#15,"B-P:2,0":GET#2,T$,S$
1080 T=ASC(T$+CHR$(0)):S=ASC(S$+CHR$(0))
1090 IF T=0 OR T>35 OR S>20 OR NF=51 THEN 1230
1100 PRINT#15,"U1:2,0";T;S
1110 FOR I=0 TO 7:IF NF=51 THEN 1220
1120 PRINT#15,"B-P:2";I*32+2
1130 GET#2,FT$(NF):IF ASC(FT$(NF)+CHR$(0))<129 THEN 1220
1140 GET#2,DT$(NF),DS$(NF)
1150 NF$(NF)="":FORJ=1TO16:GET#2,BY$:NF$(NF)=NF$(NF)+BY$:NEXT
1160 PRINT"[152] [195]OPY [151]"NF$(NF)"[152] (Y/N) ?";
1170 WAIT 198,1:GET CH$:IF CH$="N" THEN 1210
1180 IF CH$<>"Y" THEN 1170
1190 PRINT#15,"B-P:2";I*32+30:GET#2,NL$(NF),NH$(NF):IF NL$(NF)=""THENNL$(NF)=CHR$(0)
1195 IF NH$(NF)="" THEN NH$(NF)=CHR$(0)
1197 NB%(NF)=256*ASC(NH$(NF))+ASC(NL$(NF))
1200 NF=NF+1
1210 PRINTSPC(11);"[145] "SPC(18)" "
1220 NEXTI:GOTO 1070
1230 CLOSE2:CLOSE15:RETURN
1500 REM *** ***
1501 REM "*** [210]EAD [212]ARGET ID ***
1502 [143] *** ***
1510 TD$[178]"":[153]"LOADPOKE RIGHT$NSERT (null)ARGET STR$ISK.":[141] 9000
1515 [153]"LOADPOKE (null)LEASE WAIT..."
1520 [159] 15,8,15:[159] 2,8,2,"#"
1530 [132]15,EN,EM$,ET,ES:[139] EN[179][177]0 [167] [160]2:[160]15:[137] 1500
1540 [152]15,"U1:2,0";18;0
1550 [152]15,"B-P:2,144"
1560 [129] I[178]1 [164] 20:[161]#2,BY$:TD$[178]TD$[170]BY$:[130]
1570 [160]2:[160]15:[142]
2000 [143] *** ***
2001 [143] "*** LENOPY (null)ROCEDURE ***
2002 REM *** ***
2010 PRINT"[147]"
2020 IF NF=0 THEN PRINT" [211]ELECT SOURCE & FILES FIRST, PLEASE!"
2030 IF TD$="" THEN PRINT" [211]ELECT TARGET DISK FIRST, PLEASE!":GOTO 2040
2035 IF TD$=SI$ AND NF<>0 THEN PRINT" [211]OURCE & [212]ARGET DISKS HAVE SAME ID!"
2040 IF NF=0 OR TD$="" OR TD$=SI$ THEN GOSUB 9000:RETURN
2045 F1=0:B1=0:F2=0:B2=0:IF RP%=1 THEN 2210
2047 RP%=1
2050 BN=PEEK(52036):POKE51978,BN:POKE52008,BN
2055 REM *** ***
2056 REM "*** [210]EAD SOME DATA ***
2057 [143] *** ***
2060 [153]"LOADPOKE RIGHT$NSERT (null)OURCE STR$ISK.":[141] 9000:[153]"LOADPOKE(null)LEASE WAIT..."
2070 [159] 15,8,15:[159] 2,8,2,"#"
2080 [132]15,EN,EM$,ET,ES:[139] EN[179][177]0 [167] [160]2:[160]15:[137] 2060
2090 [152]15,"U1:2,0";18;0
2100 [152]15,"B-P:2,144"
2110 SO$[178]"":[129] I[178]1 [164] 20:[161]#2,BY$:SO$[178]SO$[170]BY$:[130]
2120 [139] SO$[179][177]SI$ [167] [160]2:[160]15:[137] 2060
2125 [139] B1[178]NB%(F1) [167] B1[178]0:F1[178]F1[170]1
2130 [139] F1[178]NF [167] 2200
2135 [139] BN[178][194](52037) [167] RP%[178]0:[137] 2200
2140 [139] B1[178]0 [167] T$[178]DT$(F1):S$[178]DS$(F1)
2145 T[178][198](T$[170][199](0)):S[178][198](S$[170][199](0))
2150 [152]15,"U1:2,0,";T;S
2160 [152]15,"B-P:2,2"
2170 [158] 51968
2180 BN[178]BN[170]1:B1[178]B1[170]1
2190 [152]15,"B-P:2,0":[161]#2,T$,S$:[139] S$[178]"" [167] S$[178][199](0)
2195 [137] 2125
2200 [143] *** ***
2201 [143] "*** (null)RITE THE DATA ***
2202 REM *** ***
2210 CLOSE2:CLOSE15:BN=PEEK(52036):POKE 52008,BN
2220 PRINT"[147][151] [201]NSERT [212]ARGET [196]ISK.":GOSUB 9000:PRINT"[147][151][208]LEASE WAIT..."
2230 OPEN 15,8,15:OPEN 2,8,2,"#"
2240 INPUT#15,EN,EM$,ET,ES:IF EN<>0 THEN 2210
2250 PRINT#15,"U1:2,0";18;0
2260 PRINT#15,"B-P:2,144"
2270 TA$="":FOR I=1 TO 20:GET#2,BY$:TA$=TA$+BY$:NEXT
2280 IF TA$<>TD$ THEN 2210
2290 IF B2=NB%(F2) THEN B2=0:GOSUB 2500:F2=F2+1
2295 IF EN>0 THEN E=1:GOTO 2900
2300 IF F2=NF THEN 2440
2310 IF B2=0 THEN GOSUB 2700:IF EN>0 THEN E=2:GOTO 2900
2315 IF RP%=1 THEN 2340
2320 IF F2=F1 AND B2=B1 THEN CLOSE2:CLOSE15:GOTO 2050
2340 PRINT#15,"B-P:2,2"
2350 SYS 52001
2352 T3=T2:S3=S2
2355 IF B2=NB%(F2)-1 THEN T3=0:S3=255:GOTO 2400
2360 PRINT#15,"B-A:0";T3;S3
2370 INPUT#15,EN,EM$,T4,S4
2375 IF EN=0 THEN GOTO 2400
2380 IF (EN=65 AND T4=0) OR (EN>0 AND EN<>65) THEN E=3:GOTO 2900
2385 IF T4=18 THEN T4=19:S4=0
2390 IF EN=65 THEN T3=T4:S3=S4:GOTO2360
2400 PRINT#15,"B-P:2,0"
2410 PRINT#2,CHR$(T3);CHR$(S3);
2420 PRINT#15,"U2:2,0";T2;S2
2430 BN=BN+1:B2=B2+1:T2=T3:S2=S3:GOTO 2290
2440 CLOSE2:CLOSE15:RETURN
2500 REM *** ***
2501 REM "*** [195]REATE [196]IRECTORY [197]NTRY ***
2502 [143] *** ***
2510 T4[178]18:S4[178]1
2520 [152]15,"U1:2,0";T4;S4:I[178]0
2530 [152]15,"B-P:2";I[172]32[170]2
2540 [161]#2,BY$:[139] [198](BY$[170][199](0))[179]129 [167] 2630
2550 [139] I[179]7 [167] I[178]I[170]1:[137] 2530
2560 [152]15,"B-P:2,0"
2570 [161]#2,BY$,BZ$:BY$[178][199]([198](BY$[170][199](0)))
2572 [139]BY$[179][177][199](0)[167]T4[178][198](BY$[170][199](0)):S4[178][198](BZ$[170][199](0)):[137] 2520
2575 [160] 2
2580 [159] 2,8,2,"(null)Z(null)Z(null)Z(null)Z(null)Z(null)Z(null)Z(null)Z,P,W"
2585 [132]15,EN,EM$,ET,ES:[139] EN[177]0 [167] [160]2:[159]2,8,2,"#":[142]
2590 [152]2,[199](99);:[160]2
2600 [152]15,"S0:(null)Z(null)Z(null)Z(null)Z(null)Z(null)Z(null)Z(null)Z"
2605 [159] 2,8,2,"#"
2610 [152]15,"U1:2,0";T4;S4
2620 [137] 2560
2630 [152]15,"B-P:2";I[172]32[170]2
2640 [152]2,FT$(F2);[199](T1);[199](S1);NF$(F2);
2650 [152]15,"B-P:2";I[172]32[170]30
2660 [152]2,NL$(F2);NH$(F2);
2670 [152]15,"U2:2,0";T4;S4
2680 EN[178]0:[142]
2700 [143] *** ***
2701 [143] "*** STR$ETERMINE FIRST T & S ***
2702 REM *** ***
2710 PRINT#15,"B-A:0,1,0"
2720 INPUT#15,EN,EM$,T1,S1:ET=T1:ES=S1
2730 IF EN=0 THEN T1=1:T2=1:S1=0:S2=0:RETURN
2740 IF EN<>65 OR (EN=65 AND T1=0) THEN RETURN
2750 PRINT#15,"B-A:0";T1;S1
2760 T2=T1:S2=S1:EN=0:RETURN
2900 REM *** ***
2901 REM "*** [197]RROR WHILE WRITING ***
2902 [143] *** ***
2910 [153]" ATNN ERROR HAS OCCURRED DURING WRITING !"
2920 [153]"POKE"EN","EM$","ET","ES
2930 [153]" (null)HE COPY PROCEDURE HAS BEEN ABORTED."
2940 [152]15,"V0":[160]2:[160]15
2950 [141] 9000:[137] 200
8990 [143] *** ***
8991 [143] "*** (null)AIT FOR RESPONSE ***
8992 REM *** ***
9000 PRINT" [208]RESS ANY KEY WHEN READY."
9010 WAIT 198,1:POKE 198,0:RETURN